<?php
defined('_JEXEC') or die('Restricted access');

/**
 * @package             Joomla
 * @subpackage          Celta Web Traffic Component
 * @author              Steven Palmer
 * @author url          http://celtaweb.net
 * @author email        support@celtaweb.net
 * @license             GNU/GPL, see /files/en-GB.license.txt
 * @copyright           Copyright (c) 2012 Steven Palmer All rights reserved.
 * @version             Version 0.0.1 March 2012
 *
 * Celta Web Traffic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

jimport('joomla.application.component.view');


class CeltawebticketsViewControlpanel extends JView {

	function display($tpl = null) {
	

		$user = & JFactory::getUser();
                $document = & JFactory::getDocument();
                $db  =& JFactory::getDBO();
                $uri =& JFactory::getURI();
                $user =&JFactory::getUser();
                $document->setTitle( JText::_('COM_CELTAWEBTICKETS_TITLE_MAIN') );
                JToolBarHelper::title(JText::_('COM_CELTAWEBTICKETS_MANAGER'), 'celtawebtickets');

                $this->addToolbar();
		parent::display($tpl);
	}
protected function addToolbar()
	{
                require_once JPATH_COMPONENT.'/helpers/celtawebtickets.php';
		$canDo	= CeltawebticketsHelper::getActions();
              

		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_celtawebtickets');
			JToolBarHelper::divider();
		}
        }

}
